package smetana.domain.raw;

import com.google.common.base.Preconditions;
import smetana.domain.AbstractEntity;

import static org.apache.commons.lang.StringUtils.defaultString;

public class PositionType  extends AbstractEntity {
    private int id;
    private String typeName;
    private boolean isWork;
    private boolean isGood;
    private boolean isExpense;

    protected PositionType(){
        //used by iBatis.
    }

    public PositionType(int id){
        this.id = id;
    }

    @Override
    public int getId(){
        return this.id;
    }

    public void setId(int id){
        this.id = id;
    }
    public String getTypeName(){
        return defaultString(this.typeName);
    }

    public void setTypeName(String typeName){
        this.typeName = Preconditions.checkNotNull(typeName);
    }
    public boolean getIsWork(){
        return this.isWork;
    }

    public void setIsWork(boolean isWork){
        this.isWork = isWork;
    }
    public boolean getIsGood(){
        return this.isGood;
    }

    public void setIsGood(boolean isGood){
        this.isGood = isGood;
    }
    public boolean getIsExpense(){
        return this.isExpense;
    }

    public void setIsExpense(boolean isExpense){
        this.isExpense = isExpense;
    }
}